import { Button } from 'antd-mobile'
import './index.less'

type PropsType = {
  type: 'normal' | 'withReset'
}

const FormButtonRow = (props: PropsType) => {

  const { type } = props

  const ButtonList = {
    normal: <div className='form-button-row normal'>
      <Button size='middle' type='submit' color='primary' block>
        提交
      </Button>
    </div>,
    withReset: <div className='form-button-row with-reset'>
      <Button size='middle' type='button' color='primary' block>
        重置
      </Button>
      <Button size='middle' type='button' block>
        提交
      </Button>
    </div>
  }

  return ButtonList[type]
}

export default FormButtonRow
